const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    proxy: {
      '/api': {
        target: 'https://www.ztcscan.com/blockscan', // 目标服务器地址
        ws: true, // 代理websockets
        changeOrigin: true, // 是否更改源
        pathRewrite: {
          '^/api': ''
        },
      },
    }
  },
  chainWebpack: config => {
    config
      .plugin('html')
      .tap(args => {
        args[0].title = 'ZTCscan'; // 设置新的标题
        args[0].favicon = 'src/assets/img/nav-logo.png'; // 设置新的 favicon 路径
        return args;
      });
  }

})
